"""
实战一： 打印象棋口诀
应用字符串保存象棋口诀并加上正确的标点符号输出
"""
sentences = '''马走日
像走田
车走直路炮翻山
士走斜线护将边
小卒一去不回还'''
array = sentences.split('\n')
colon = ':'
comma = ','
fullstop = '。'
# print(sentences)
print(array)
print('象棋口诀:')
array.insert(0, '象棋口诀')
print(array)
length = len(array)
print(length)
for index, value in enumerate(array):
    sympol = comma
    if index == 0:
        sympol = colon
    elif index == length-1:
        sympol = fullstop
    else:
        sympol = comma
    print(value, sympol)
